<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:cc="http://java.sun.com/jsf/composite/components"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>Pie Chart</title>
</h:head>

<h:body>
	<h:form prependId="false">

		<p:pieChart id="pieChart" value="#{chartBean.pieModel}"
			legendPosition="e" title=" Pie Chart"
			style="width:600px;height:600px">
			<p:ajax event="itemSelect" listener="#{chartBean.itemSelect}"
				update="pnl" />
		</p:pieChart>

		<p:panel id="pnl" header="Menu Detail" style="margin-bottom:10px;">
			<h:outputText value="#{chartBean.selectedItem} Menu......" />

		
				<p:dataTable id="basic" var="item" value="#{chartBean.currentList}">
					<p:column id="modelHeader">
						<f:facet name="header">  
                    Menu Items  
            </f:facet>
						<h:outputText value="#{item}" />
					</p:column>

					
				</p:dataTable>
	

		</p:panel>

	</h:form>
</h:body>
</html>
